package com.example.basic.domain;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.example.basic.constant.BaseConstants;
import com.example.basic.util.DateConverter;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Data
@ColumnWidth(20)
public class Task {

    @ExcelIgnore
    private Long taskId;

    @ExcelProperty("任务名称")
    private String taskName;

    @ExcelProperty("描述")
    private String description;

    @ExcelProperty("备注")
    private String remark;

    @ExcelProperty("分数")
    private String score;

    @ExcelProperty("最终分数(分数/2)")
    private String finalScore;

    @ExcelIgnore
    private Integer versionNumber;

    @JsonFormat(pattern = BaseConstants.Pattern.DATETIME)
    @DateTimeFormat(pattern = BaseConstants.Pattern.DATETIME)
    @ExcelProperty(value = "创建时间", converter = DateConverter.class)
    private Date creationDate;
}
